<?php
namespace app\common\model;

use think\Model;

class ShopCategory extends Model
{

    public function lists($shop_id,$store_id,$pid = 0)
    {   

        $where = [
                 'store_id' => $store_id,
                 'status'   => 'normal',
                 'pid'      => $pid
            ];
        $list = $this->where($where)
                     ->order('weigh desc')
                     ->select();
       // foreach ($list as $cate){
       //     $cate->hidden(['status','createtime','weigh']);
       // }
        $list = $list ? collection($list)->toArray() : [];
        return $list;
    }
}